#pragma once
#include "Light.h"
#include <vector>
#include "SimpleRender.h"
using namespace std;



class LightManager
{
public:
	LightManager(void);
	~LightManager(void);

	vector<PointLight*> PointLights;
	vector<DirectionalLight*> DirectionalLights;
	vector<SpotLight*> SpotLights;
	D3DXCOLOR AmbientColour;

	void Init();
	int GetTotalLightNum(); // how many lights are currently being managed
	void SetAmbientColour(float r, float g, float b);

	void AddPointLight(PointLight *light) 
	{ 
		PointLights.push_back(light);
		RegisterLight(light);
	}

	void AddSpotLight(SpotLight *light) 
	{ 
		SpotLights.push_back(light);
		RegisterLight(light);
	}

	void AddDirectionalLight(DirectionalLight *light) 
	{ 
		DirectionalLights.push_back(light);
		RegisterLight(light);
	}

protected:
	void RegisterLight(Light *light);

};
